package nl.Viewer.ViewManager.Controllers;

import nl.Viewer.SerializedObjects.DataObject;
import nl.Viewer.SerializedObjects.Modality;
import nl.Viewer.SerializedObjects.Visualization;
import nl.Viewer.Sessions.ClientSideSession;
import nl.Viewer.ViewManager.Models.DataStores.ImageDataStore;
import nl.Viewer.ViewManager.Views.JOGLImageDataObjectAsPlaneView;
import nl.Viewer.ViewManager.Views.JOGLPlaneOrientationView;
import nl.Viewer.ViewManager.Views.ParameterView.DefaultParameterView;

/**
 * The implementation of the controller capable of displaying a plane intersections of a three dimensional volume
 * @see GenericController
 * 
 * @author Jeroen Verschuur
 * 
 */

public class ImageAsPlaneController extends GenericController {
   private static final long serialVersionUID = -1002462025249966454L;

   public ImageAsPlaneController( Visualization v, Modality modality, ClientSideSession session, String outputType ) {
      super( v, modality, session, outputType );

      // set the renderer (and button bar if needed)
      this.visualizationRenderer = new JOGLImageDataObjectAsPlaneView( this );
      this.orientationView = new JOGLPlaneOrientationView( this );
      this.parameterView = new DefaultParameterView( this, new String[] { "CutPlaneNormal", "CutPlaneOrigin", "Zoom", "AnnotationFocalPoint", "BaseImageOrOverlay", "ViewSize" } );

      super.initializeComponents();
   }

   public void createNewDataStore( DataObject dataObject ) {
      dataModel.createNewDataStore( new ImageDataStore( dataObject ) );
   }

}
